package cn.ucai.day09;

import java.util.Scanner;

public class TestGrade {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int i=scan.nextInt();
		switch(i){
		case 2:System.out.print("2");break;//print 2;
		case 1:System.out.print("1");break;
		default:System.out.print("0");
			
		}
	}

}
